package com.itmk.web.sys_class.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itmk.web.sys_class.entity.ClassPage;
import com.itmk.web.sys_class.entity.SysClass;
import com.itmk.web.sys_class.mapper.SysClassMapper;
import com.itmk.web.sys_class.service.SysClassService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author java实战基地
 * @since 2023-10-08
 */
@Service
public class SysClassServiceImpl extends ServiceImpl<SysClassMapper, SysClass> implements SysClassService {

    @Override
    public IPage<SysClass> getList(ClassPage parm) {
        //构造分页对象
        IPage<SysClass> page = new Page<>(parm.getCurrentPage(),parm.getPageSize());

        return this.baseMapper.getList(page,parm.getMajorId(),parm.getClassName(),parm.getYears());
    }
}
